@extends('layouts.template')

@section('title', '管理后台')

@section('content')

    <script>
        var selectedMenu = 'order/all';
        var selectedTitle = '订单详情';

        $(function(){

            var form = new Vue({
                el:'#contentpanel',
                data:{
                },
                computed:{
                },
                mounted:function(){
                },
                watch: {
                },
                methods:{
                },
                components:{
                }
            });

        });

    </script>

    <div class="contentpanel" id="contentpanel">

        <div class="row">
            <div class="col-md-12">

                @component('order.layouts.showHeader',['option'=>'refund','order'=>$order])
                @endcomponent

                <!-- Tab panes -->
                <div class="tab-content mb30">
                    <div class="tab-pane active">

                        <div class="panel panel-default">
                            <div class="panel-body nopadding">
                                <form class="form-bordered">
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><strong><u>退款状态</u></strong></label>
                                        <div class="col-sm-9">
                                            {{$order->status->refund_status_text}}
                                            @if ($order->refund->refunding)
                                                （{{$order->refund->auto_refund_endtime}}内未确认，将默认自动退款）
                                            @elseif ($order->refund->arbitrating)
                                                介入仲裁中（平台客服调查取证中）
                                            @endif
                                        </div>
                                    </div><!-- form-group -->
                                </form>
                            </div><!-- panel-body -->
                            <div class="panel-heading">
                                <div class="panel-btns" style="display: none;">
                                    <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title="" data-original-title="Minimize Panel"><i class="fa fa-minus"></i></a>
                                    <a href="" class="panel-close tooltips" data-toggle="tooltip" title="" data-original-title="Close Panel"><i class="fa fa-times"></i></a>
                                </div><!-- panel-btns -->
                                <h5 class="panel-title">订单编号：{{$order->order_number}}&nbsp;&nbsp;&nbsp;&nbsp;订单金额：{{$order->merchant_price}}元&nbsp;&nbsp;&nbsp;&nbsp;支付方式：{{$order->merchant_trade_log->source_text}}</h5>
                            </div><!-- panel-heading -->
                            <div class="panel-body nopadding">
                                <form class="form-bordered">
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><strong><u>申请退款信息</u></strong></label>
                                        <div class="col-sm-9">
                                            退款编号：{{$order->refund->order_number}}
                                        </div>
                                        <div class="col-sm-9">
                                            退款时间：{{$order->refund->refund_time}}
                                        </div>
                                        <div class="col-sm-9">
                                            退款类型：{{$order->refund->refund_type_text}}
                                        </div>
                                        <div class="col-sm-9">
                                            申请金额：{{$order->refund->refund_amount}}元
                                        </div>
                                        <div class="col-sm-9">
                                            退还方式：{{$order->refund->refund_method_text}}
                                        </div>
                                        <div class="col-sm-9">
                                            退款说明：{{$order->refund->refund_reason}}
                                        </div>
                                    </div><!-- form-group -->

                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><strong><u>师傅处理结果</u></strong></label>
                                        @if ($order->refund->refunding)
                                            <div class="col-sm-9">
                                                处理操作：等待师傅处理
                                            </div>
                                        @elseif ($order->refund->refund_agree)
                                            <div class="col-sm-9">
                                                处理操作：{{$order->refund->refund_result_type_text}}
                                            </div>
                                            <div class="col-sm-9">
                                                处理时间：{{$order->refund->refund_result_time}}
                                            </div>
                                            <div class="col-sm-9">
                                                退款金额：{{$order->refund->refund_amount}}元
                                            </div>
                                        @elseif ($order->refund->refund_disagree)
                                            <div class="col-sm-9">
                                                处理操作：{{$order->refund->refund_result_type_text}}
                                            </div>
                                            <div class="col-sm-9">
                                                处理时间：{{$order->refund->refund_result_time}}
                                            </div>
                                            <div class="col-sm-9">
                                                不同意原因：{{$order->refund->refund_refuse_reason}}
                                            </div>
                                        @endif
                                    </div><!-- form-group -->

                                    @if ($order->status->have_arbitrate)
                                        <div class="form-group">
                                            <label class="col-sm-4 control-label"><strong><u>平台客服介入仲裁结果</u></strong></label>
                                            <div class="col-sm-9">
                                                仲裁结果：{{$order->refund->arbitrate_result_type_text}}
                                            </div>
                                            <div class="col-sm-9">
                                                退款金额：{{$order->refund->arbitrate_result_amount}}
                                            </div>
                                            <div class="col-sm-9">
                                                仲裁时间：{{$order->refund->arbitrate_result_time}}
                                            </div>
                                            <div class="col-sm-9">
                                                仲裁说明：{{$order->refund->arbitrate_result_reason}}
                                            </div>
                                        </div><!-- form-group -->
                                    @endif
                                </form>
                            </div><!-- panel-body -->
                        </div>

                    </div><!-- tab-pane -->
                </div><!-- tab-content -->

            </div><!-- col-md-6 -->
        </div>
    </div><!-- contentpanel -->

@endsection

